<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ attribute name="created" required="true" rtexprvalue="true"%>
<%@ attribute name="title" required="true" rtexprvalue="true"%>
<%@ attribute name="articleId" required="true" rtexprvalue="true"%>
<%@ attribute name="authorId" required="true" rtexprvalue="true"%>
<%@ attribute name="authorName" required="true" rtexprvalue="true"%>

<c:url value="/article/${articleId}" var="articleDetails" />

<div class="article clearfix">
  <section>
    <div class="pull-right">
      <p>created: ${created}</p>
    </div>
    <h4>
      <a href="${articleDetails}" >${title}</a>
    </h4>
    <p class="clearfix"><jsp:doBody /></p>
    <p><em><a href="#" class="js-article pull-left"
        data-toggle="js-comments-${articleId}">Toggle comments</a></em></p>
    <p class="pull-right">
      Written by: <a href="<c:url value='/coder/${authorId}' />"
        title="Visit profile"> ${authorName} </a>
    </p>
  </section>
</div>